<?php

/**
 * This is the model class for table "{{student}}".
 *
 * The followings are the available columns in table '{{student}}':
 * @property double $student_id
 * @property string $student_name
 * @property double $exam_id
 * @property string $exam_code
 * @property string $city_code
 * @property string $city_name
 * @property string $school_code
 * @property string $school_name
 * @property string $class_name
 * @property double $student_sex
 * @property double $socre
 * @property string $disciplin_code
 * @property string $disciplin_name
 * @property double $disciplin_type
 * @property string $statis
 * @property string $nature
 * @property string $interstellar
 * @property string $roll
 * @property string $ramark
 * @property double $addtime
 * @property double $uptime
 * @property double $school_id
 * @property double $ywkgf
 * @property double $ywzgf
 * @property double $ywzwf
 * @property double $ywfjf
 * @property double $ywf
 * @property double $sxtkf
 * @property double $sxjdf
 * @property double $sxfjf
 * @property double $sxf
 * @property double $yykgf
 * @property double $yyzgf
 * @property double $yyzwf
 * @property double $yyf
 * @property double $wlkgf
 * @property double $wlzgf
 * @property double $wlf
 * @property double $hxkgf
 * @property double $hxzgf
 * @property double $hxf
 * @property double $swkgf
 * @property double $swzgf
 * @property double $swf
 * @property double $lskgf
 * @property double $lszgf
 * @property double $zzkgf
 * @property double $zzzgf
 * @property double $zzf
 * @property double $dlkgf
 * @property double $dlzgf
 * @property double $dlf
 * @property double $yswzf
 * @property double $yswzfhfjf
 */
class Student extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @param string $className active record class name.
	 * @return Student the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return '{{student}}';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('exam_id, student_sex, socre, disciplin_type, addtime, uptime, school_id, ywkgf, ywzgf, ywzwf, ywfjf, ywf, sxtkf, sxjdf, sxfjf, sxf, yykgf, yyzgf, yyzwf, yyf, wlkgf, wlzgf, wlf, hxkgf, hxzgf, hxf, swkgf, swzgf, swf, lskgf, lszgf, zzkgf, zzzgf, zzf, dlkgf, dlzgf, dlf, yswzf, yswzfhfjf', 'numerical'),
			array('student_name, exam_code, city_code, city_name, school_code, school_name, class_name, disciplin_code, disciplin_name, roll', 'length', 'max'=>50),
			array('statis, nature, interstellar', 'length', 'max'=>10),
			array('ramark', 'length', 'max'=>200),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('student_id, student_name, exam_id, exam_code, city_code, city_name, school_code, school_name, class_name, student_sex, socre, disciplin_code, disciplin_name, disciplin_type, statis, nature, interstellar, roll, ramark, addtime, uptime, school_id, ywkgf, ywzgf, ywzwf, ywfjf, ywf, sxtkf, sxjdf, sxfjf, sxf, yykgf, yyzgf, yyzwf, yyf, wlkgf, wlzgf, wlf, hxkgf, hxzgf, hxf, swkgf, swzgf, swf, lskgf, lszgf, zzkgf, zzzgf, zzf, dlkgf, dlzgf, dlf, yswzf, yswzfhfjf', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'student_id' => 'Student',
			'student_name' => 'Student Name',
			'exam_id' => 'Exam',
			'exam_code' => 'Exam Code',
			'city_code' => 'City Code',
			'city_name' => 'City Name',
			'school_code' => 'School Code',
			'school_name' => 'School Name',
			'class_name' => 'Class Name',
			'student_sex' => 'Student Sex',
			'socre' => 'Socre',
			'disciplin_code' => 'Disciplin Code',
			'disciplin_name' => 'Disciplin Name',
			'disciplin_type' => 'Disciplin Type',
			'statis' => 'Statis',
			'nature' => 'Nature',
			'interstellar' => 'Interstellar',
			'roll' => 'Roll',
			'ramark' => 'Ramark',
			'addtime' => 'Addtime',
			'uptime' => 'Uptime',
			'school_id' => 'School',
			'ywkgf' => 'Ywkgf',
			'ywzgf' => 'Ywzgf',
			'ywzwf' => 'Ywzwf',
			'ywfjf' => 'Ywfjf',
			'ywf' => 'Ywf',
			'sxtkf' => 'Sxtkf',
			'sxjdf' => 'Sxjdf',
			'sxfjf' => 'Sxfjf',
			'sxf' => 'Sxf',
			'yykgf' => 'Yykgf',
			'yyzgf' => 'Yyzgf',
			'yyzwf' => 'Yyzwf',
			'yyf' => 'Yyf',
			'wlkgf' => 'Wlkgf',
			'wlzgf' => 'Wlzgf',
			'wlf' => 'Wlf',
			'hxkgf' => 'Hxkgf',
			'hxzgf' => 'Hxzgf',
			'hxf' => 'Hxf',
			'swkgf' => 'Swkgf',
			'swzgf' => 'Swzgf',
			'swf' => 'Swf',
			'lskgf' => 'Lskgf',
			'lszgf' => 'Lszgf',
			'zzkgf' => 'Zzkgf',
			'zzzgf' => 'Zzzgf',
			'zzf' => 'Zzf',
			'dlkgf' => 'Dlkgf',
			'dlzgf' => 'Dlzgf',
			'dlf' => 'Dlf',
			'yswzf' => 'Yswzf',
			'yswzfhfjf' => 'Yswzfhfjf',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('student_id',$this->student_id);
		$criteria->compare('student_name',$this->student_name,true);
		$criteria->compare('exam_id',$this->exam_id);
		$criteria->compare('exam_code',$this->exam_code,true);
		$criteria->compare('city_code',$this->city_code,true);
		$criteria->compare('city_name',$this->city_name,true);
		$criteria->compare('school_code',$this->school_code,true);
		$criteria->compare('school_name',$this->school_name,true);
		$criteria->compare('class_name',$this->class_name,true);
		$criteria->compare('student_sex',$this->student_sex);
		$criteria->compare('socre',$this->socre);
		$criteria->compare('disciplin_code',$this->disciplin_code,true);
		$criteria->compare('disciplin_name',$this->disciplin_name,true);
		$criteria->compare('disciplin_type',$this->disciplin_type);
		$criteria->compare('statis',$this->statis,true);
		$criteria->compare('nature',$this->nature,true);
		$criteria->compare('interstellar',$this->interstellar,true);
		$criteria->compare('roll',$this->roll,true);
		$criteria->compare('ramark',$this->ramark,true);
		$criteria->compare('addtime',$this->addtime);
		$criteria->compare('uptime',$this->uptime);
		$criteria->compare('school_id',$this->school_id);
		$criteria->compare('ywkgf',$this->ywkgf);
		$criteria->compare('ywzgf',$this->ywzgf);
		$criteria->compare('ywzwf',$this->ywzwf);
		$criteria->compare('ywfjf',$this->ywfjf);
		$criteria->compare('ywf',$this->ywf);
		$criteria->compare('sxtkf',$this->sxtkf);
		$criteria->compare('sxjdf',$this->sxjdf);
		$criteria->compare('sxfjf',$this->sxfjf);
		$criteria->compare('sxf',$this->sxf);
		$criteria->compare('yykgf',$this->yykgf);
		$criteria->compare('yyzgf',$this->yyzgf);
		$criteria->compare('yyzwf',$this->yyzwf);
		$criteria->compare('yyf',$this->yyf);
		$criteria->compare('wlkgf',$this->wlkgf);
		$criteria->compare('wlzgf',$this->wlzgf);
		$criteria->compare('wlf',$this->wlf);
		$criteria->compare('hxkgf',$this->hxkgf);
		$criteria->compare('hxzgf',$this->hxzgf);
		$criteria->compare('hxf',$this->hxf);
		$criteria->compare('swkgf',$this->swkgf);
		$criteria->compare('swzgf',$this->swzgf);
		$criteria->compare('swf',$this->swf);
		$criteria->compare('lskgf',$this->lskgf);
		$criteria->compare('lszgf',$this->lszgf);
		$criteria->compare('zzkgf',$this->zzkgf);
		$criteria->compare('zzzgf',$this->zzzgf);
		$criteria->compare('zzf',$this->zzf);
		$criteria->compare('dlkgf',$this->dlkgf);
		$criteria->compare('dlzgf',$this->dlzgf);
		$criteria->compare('dlf',$this->dlf);
		$criteria->compare('yswzf',$this->yswzf);
		$criteria->compare('yswzfhfjf',$this->yswzfhfjf);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}